Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: adding big block tests to the main branch #3612

Merged
merged 83 commits into from
Jul 8, 2024

Conversation

staheri14
Copy link
Contributor

@staheri14 staheri14 commented Jun 21, 2024

Part of #3557
Closes #3614
Closes #3638
Closes #3371

@staheri14 staheri14 self-assigned this Jun 21, 2024
@staheri14
Copy link
Contributor Author

I re-ran a subset of benchmark tests, and they looked good, hence opening this PR for review.

@staheri14 staheri14 marked this pull request as ready for review July 2, 2024 23:34
@staheri14
Copy link
Contributor Author

The CI failures will be resolved by #3653

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

test/e2e/benchmark/throughput.go Outdated Show resolved Hide resolved
test/e2e/benchmark/throughput.go Outdated Show resolved Hide resolved
test/e2e/benchmark/throughput.go Outdated Show resolved Hide resolved
test/e2e/benchmark/throughput.go Outdated Show resolved Hide resolved
test/e2e/benchmark/throughput.go Outdated Show resolved Hide resolved
test/e2e/benchmark/throughput.go Outdated Show resolved Hide resolved
test/e2e/benchmark/throughput.go Outdated Show resolved Hide resolved
Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only very minor things

could we do the refactors coderabbit is suggesting to simplify the tests? if so, are there downsides to that?

test/e2e/testnet/node.go Outdated Show resolved Hide resolved
test/e2e/benchmark/manifest.go Outdated Show resolved Hide resolved
evan-forbes
evan-forbes previously approved these changes Jul 3, 2024
logger.Println("=== RUN TwoNodeSimple", "version:", latestVersion)
testName := "TwoNodeSimple"
logger.Printf("Running %s\n", testName)
logger.Println("version", latestVersion)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this missing a formatting directive?

Suggested change
logger.Println("version", latestVersion)
logger.Printf("version %v\n", latestVersion)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They both indeed work identically:
The Println function prints the supplied inputs with comma separation, whereas in Printf, I achieved the same result using formatting. Here is a sample output from the tests:

test-e2e-benchmark2024/07/08 11:34:05 Running TwoNodeSimple
test-e2e-benchmark2024/07/08 11:34:05 version 8caa580

Their implementation is just inconsistent, which I can fix in a follow-up PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see #3670

Comment on lines +167 to +169
if size > maxBlockSize {
maxBlockSize = size
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I don't think these lines will be executed if the previous conditional evaluates to true b/c the break so consider re-ordering this above the previous conditional so that maxBlockSize accounts for the block that actually exceeds >= expectedBlockSizeBytes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current version is correct as well. I see what causes confusion here: the value of maxBlockSize is only used when the target size is not reached. That is, if size >= expectedBlockSizeBytes is never hit, and if that condition is never met, then maxBlockSize correctly reflects the most recent maximum size observed. If we do hit the expectedBlockSizeBytes condition and if size >= expectedBlockSizeBytes evaluates to true, then the value of maxBlockSize does not matter. Nevertheless, to resolve future confusion, I will apply your suggestion in a follow up PR, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see #3670

@staheri14
Copy link
Contributor Author

The markdown linter complaint is unrelated to this PR and will be resolved independently in #3668

@staheri14 staheri14 merged commit 34cd4b3 into main Jul 8, 2024
33 of 34 checks passed
@staheri14 staheri14 deleted the sanaz/migrate-big-block-tests branch July 8, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WS: Big Blonks 🔭 Improving consensus critical gossiping protocols
Projects
None yet
3 participants